﻿﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;
using Fcdbas.Core;
using Fcdbas.Core.Configuration;
using Fcdbas.Core.DataAccess;


namespace Fcdbas.Biz
{
    /// <summary></summary>
    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("fnd_language_code", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class fnd_language_code : Entity<fnd_language_code>,Ifnd_language_code
    {
        #region 属性
 
        private String _lang_code;

        /// <summary>FLAGS=KMI-L^DATATYPE=STRING(3)/UPPERCASE^PROMPT=Lang Code^</summary>
        [DisplayName("Code")]
        [Description("FLAGS=KMI-L^DATATYPE=STRING(3)/UPPERCASE^PROMPT=Lang Code^")]
        [DataObjectField(false, false, false, 3)]
        [BindColumn(1, "lang_code",  null, "varchar(3)", 0, 0, false)]

        public virtual String lang_code

        {
            get { return _lang_code; }
            set { if (OnPropertyChanging(__.lang_code, value)) { _lang_code = value; OnPropertyChanged(__.lang_code); } }
        }

 
        private String _description;

        /// <summary>FLAGS=AMIUL^DATATYPE=STRING(50)^PROMPT=Description^</summary>
        [DisplayName("Description")]
        [Description("FLAGS=AMIUL^DATATYPE=STRING(50)^PROMPT=Description^")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(2, "description",  null, "varchar(50)", 0, 0, false)]

        public virtual String description

        {
            get { return _description; }
            set { if (OnPropertyChanging(__.description, value)) { _description = value; OnPropertyChanged(__.description); } }
        }

 
        private String _actived;

        /// <summary>FLAGS=AMIUL^DATATYPE=STRING(5)/UPPERCASE^PROMPT=Actived^</summary>
        [DisplayName("Actived")]
        [Description("FLAGS=AMIUL^DATATYPE=STRING(5)/UPPERCASE^PROMPT=Actived^")]
        [DataObjectField(false, false, false, 5)]
        [BindColumn(3, "actived",  null, "varchar(5)", 0, 0, false)]

        public virtual String actived

        {
            get { return _actived; }
            set { if (OnPropertyChanging(__.actived, value)) { _actived = value; OnPropertyChanged(__.actived); } }
        }

 
        private String _nls_language;

        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Nls Language^</summary>
        [DisplayName("Language")]
        [Description("FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Nls Language^")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(4, "nls_language",  null, "varchar(50)", 0, 0, false)]

        public virtual String nls_language

        {
            get { return _nls_language; }
            set { if (OnPropertyChanging(__.nls_language, value)) { _nls_language = value; OnPropertyChanged(__.nls_language); } }
        }

 
        private String _date_format;

        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Format^</summary>
        [DisplayName("Format")]
        [Description("FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Format^")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(5, "date_format",  null, "varchar(50)", 0, 0, false)]

        public virtual String date_format

        {
            get { return _date_format; }
            set { if (OnPropertyChanging(__.date_format, value)) { _date_format = value; OnPropertyChanged(__.date_format); } }
        }

 
        private String _time_format;

        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Time Format^</summary>
        [DisplayName("Format1")]
        [Description("FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Time Format^")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(6, "time_format",  null, "varchar(50)", 0, 0, false)]

        public virtual String time_format

        {
            get { return _time_format; }
            set { if (OnPropertyChanging(__.time_format, value)) { _time_format = value; OnPropertyChanged(__.time_format); } }
        }

 
        private String _date_time_format;

        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Time Format^</summary>
        [DisplayName("Time_Format")]
        [Description("FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Time Format^")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(7, "date_time_format",  null, "varchar(50)", 0, 0, false)]

        public virtual String date_time_format

        {
            get { return _date_time_format; }
            set { if (OnPropertyChanging(__.date_time_format, value)) { _date_time_format = value; OnPropertyChanged(__.date_time_format); } }
        }

 
        private DateTime? _update_time;

        /// <summary>FLAGS=A-IU-^DATATYPE=DATE/DATETIME^PROMPT=Update Date^</summary>
        [DisplayName("Time")]
        [Description("FLAGS=A-IU-^DATATYPE=DATE/DATETIME^PROMPT=Update Date^")]
        [DataObjectField(false, false, true, 0)]
        [BindColumn(8, "update_time",  null, "datetime", 0, 0, false)]

        public virtual DateTime? update_time

        {
            get { return _update_time; }
            set { if (OnPropertyChanging(__.update_time, value)) { _update_time = value; OnPropertyChanged(__.update_time); } }
        }

 
        private String _objid;

        /// <summary></summary>
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(9, "objid",  null, "varchar(50)", 0, 0, false)]

        public virtual String objid

        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }

 
        private String _objversion;

        /// <summary></summary>
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 24)]
        [BindColumn(10, "objversion",  null, "varchar(24)", 0, 0, false)]

        public virtual String objversion

        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        /// <summary>
        /// 获取/设置 字段值。
        /// 一个索引，基类使用反射实现。
        /// 派生实体类可重写该索引，以避免反射带来的性能损耗
        /// </summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.lang_code : return _lang_code;
                    case __.description : return _description;
                    case __.actived : return _actived;
                    case __.nls_language : return _nls_language;
                    case __.date_format : return _date_format;
                    case __.time_format : return _time_format;
                    case __.date_time_format : return _date_time_format;
                    case __.update_time : return _update_time;
                    case __.objid : return _objid;
                    case __.objversion : return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.lang_code : 
                        if(value != null)
                            _lang_code = Convert.ToString(value);
                        else
                            _lang_code = null;
                    break;
                    case __.description : 
                        if(value != null)
                            _description = Convert.ToString(value);
                        else
                            _description = null;
                    break;
                    case __.actived : 
                        if(value != null)
                            _actived = Convert.ToString(value);
                        else
                            _actived = null;
                    break;
                    case __.nls_language : 
                        if(value != null)
                            _nls_language = Convert.ToString(value);
                        else
                            _nls_language = null;
                    break;
                    case __.date_format : 
                        if(value != null)
                            _date_format = Convert.ToString(value);
                        else
                            _date_format = null;
                    break;
                    case __.time_format : 
                        if(value != null)
                            _time_format = Convert.ToString(value);
                        else
                            _time_format = null;
                    break;
                    case __.date_time_format : 
                        if(value != null)
                            _date_time_format = Convert.ToString(value);
                        else
                            _date_time_format = null;
                    break;
                    case __.update_time : 
                        if(value != null)
                            _update_time = Convert.ToDateTime(value);
                        else
                            _update_time = null;
                    break;
                    case __.objid : 
                        if(value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                    break;
                    case __.objversion : 
                        if(value != null)
                            _objversion = Convert.ToString(value);
                        else
                            _objversion = null;
                    break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得字段信息的快捷方式</summary>
        public class _
        {
            ///<summary>FLAGS=KMI-L^DATATYPE=STRING(3)/UPPERCASE^PROMPT=Lang Code^</summary>
            public static readonly Field lang_code = FindByName(__.lang_code);

            ///<summary>FLAGS=AMIUL^DATATYPE=STRING(50)^PROMPT=Description^</summary>
            public static readonly Field description = FindByName(__.description);

            ///<summary>FLAGS=AMIUL^DATATYPE=STRING(5)/UPPERCASE^PROMPT=Actived^</summary>
            public static readonly Field actived = FindByName(__.actived);

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Nls Language^</summary>
            public static readonly Field nls_language = FindByName(__.nls_language);

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Format^</summary>
            public static readonly Field date_format = FindByName(__.date_format);

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Time Format^</summary>
            public static readonly Field time_format = FindByName(__.time_format);

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Time Format^</summary>
            public static readonly Field date_time_format = FindByName(__.date_time_format);

            ///<summary>FLAGS=A-IU-^DATATYPE=DATE/DATETIME^PROMPT=Update Date^</summary>
            public static readonly Field update_time = FindByName(__.update_time);

            ///<summary></summary>
            public static readonly Field objid = FindByName(__.objid);

            ///<summary></summary>
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }

        /// <summary>取得字段名称的快捷方式</summary>
        class __
        {
            ///<summary>FLAGS=KMI-L^DATATYPE=STRING(3)/UPPERCASE^PROMPT=Lang Code^</summary>
            public const String lang_code = "lang_code";

            ///<summary>FLAGS=AMIUL^DATATYPE=STRING(50)^PROMPT=Description^</summary>
            public const String description = "description";

            ///<summary>FLAGS=AMIUL^DATATYPE=STRING(5)/UPPERCASE^PROMPT=Actived^</summary>
            public const String actived = "actived";

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Nls Language^</summary>
            public const String nls_language = "nls_language";

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Format^</summary>
            public const String date_format = "date_format";

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Time Format^</summary>
            public const String time_format = "time_format";

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Time Format^</summary>
            public const String date_time_format = "date_time_format";

            ///<summary>FLAGS=A-IU-^DATATYPE=DATE/DATETIME^PROMPT=Update Date^</summary>
            public const String update_time = "update_time";

            ///<summary></summary>
            public const String objid = "objid";

            ///<summary></summary>
            public const String objversion = "objversion";

        }
        #endregion
    }

    /// <summary>接口</summary>
    public partial interface Ifnd_language_code
    {
       #region 属性
        /// <summary>FLAGS=KMI-L^DATATYPE=STRING(3)/UPPERCASE^PROMPT=Lang Code^</summary>

        String lang_code { get; set; }


        /// <summary>FLAGS=AMIUL^DATATYPE=STRING(50)^PROMPT=Description^</summary>

        String description { get; set; }


        /// <summary>FLAGS=AMIUL^DATATYPE=STRING(5)/UPPERCASE^PROMPT=Actived^</summary>

        String actived { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Nls Language^</summary>

        String nls_language { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Format^</summary>

        String date_format { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Time Format^</summary>

        String time_format { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Date Time Format^</summary>

        String date_time_format { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=DATE/DATETIME^PROMPT=Update Date^</summary>

        DateTime? update_time { get; set; }


        /// <summary></summary>

        String objid { get; set; }


        /// <summary></summary>

        String objversion { get; set; }

        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值。</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        Object this[String name] { get; set; }
        #endregion
    }
}